﻿using FastExecutor.Base.Design;
using FastExecutor.Base.Util;
using FastExecutor.ORG.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FastExecutor.ORG.DB
{
    public class DB_CodeMain : FastTemplateDB<Frame_CodeMain>
    {
        public override void Insert(Frame_CodeMain Entity)
        {
            Entity.RowGuid = CommonUtil.CreateCommonGuid();
            Entity.AddDate = DateTime.Now;
            base.Insert(Entity);
        }

        public override void BatchDelete(List<string> KeyGuidList)
        {
            foreach (string KeyGuid in KeyGuidList)
            {
                @DBUtil.ExecuteSQL(string.Format("delete from Frame_CodeItem where MainGuid='{0}'", KeyGuid));
            }
            base.BatchDelete(KeyGuidList);
        }
    }
}
